﻿using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using XRM.Security.DataAccess.Models;

namespace XRM.Security.DataAccess.Context
{
    public interface IDbContext : IDisposable
    {
        DbSet<T> Set<T>() where T : class;
        DbEntityEntry<T> Entry<T>( T entity ) where T : class;
        int SaveChanges();
        void SetModified(object entity);

        DbSet<SystemUser> SystemUsers { get; set; }
        DbSet<Department> Departments { get; set; }
        DbSet<DepartmentAddress> DepartmentAddresses { get; set; }
        DbSet<SkziKind> SkziKinds { get; set; }
        DbSet<SertificateFsb> SertificateFsbs { get; set; }
        DbSet<SertificateFstk> SertificateFstks { get; set; }
        DbSet<InfoSystem> InfoSystem { get; set; }
        DbSet<InfoSystemFile> InfoSystemFile { get; set; }
        DbSet<IdentityCenter> IdentityCenter { get; set; }
        DbSet<IdentityCenterCert> IdentityCenterCert { get; set; }
        DbSet<IdentityCenterInfoSystem> IdentityCenterInfoSystem { get; set; }

        DbSet<WorkKind> WorkKind { get; set; }
        DbSet<WorkKindParam> WorkKindParam { get; set; }
        DbSet<WorkKindSpec> WorkKindSpec { get; set; }

        DbSet<CertRegister> CertRegister { get; set; }
        DbSet<CertRegisterInfoSystem> CertRegisterInfoSystem { get; set; }
        
        DbSet<PC> PC { get; set; }
        DbSet<PCSticker> PCSticker { get; set; }
        DbSet<UserRegister> UserRegister { get; set; }
        DbSet<UserPC> UserPC { get; set; }
        DbSet<UserSkzi> UserSkzi { get; set; }
        DbSet<UserInfoSystem> UserInfoSystem { get; set; }
        DbSet<UserHistory> UserHistory { get; set; }

        DbSet<Request> Request { get; set; }
        DbSet<RequestWorkKind> RequestWorkKind { get; set; }
        DbSet<RequestWorkKindParam> RequestWorkKindParam { get; set; }
        DbSet<RequestWorkKindParamSpec> RequestWorkKindParamSpec { get; set; }

        DbSet<RequestCert> RequestCert { get; set; }
        DbSet<RequestCertInfoSystem> RequestCertInfoSystem { get; set; }
        
        DbSet<Role> Roles { get; set; }
        DbSet<RoleMember> RoleMembers { get; set; }
    }
}
